package main

import "fmt"

func fibonacci() func()int{
	var i,s,tmp int = 1,0,0
	return func()int{
		if i==1 {
			s=0
		}else if i==2 {
			s=1
		}else{
			s=s+tmp
			tmp=s-tmp
		}
		i=i+1
		return s
	}
}

func main() {
	f:=fibonacci()
	for j:=0;j<10;j++{
		fmt.Print("hello ")
		fmt.Println(f())
	}

	f=fibonacci()
	for j:=0;j<10;j++{
		fmt.Print("world ")
		fmt.Println(f())
	}
}
